﻿<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/2010admin/Check_IsLogin.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/nav.css" media="screen" />

<title><%=web_title%></title>
<style type="text/css">
.navbg{ display:none;}
#accordion h4.current a {
cursor:default;
color:#fff;
}
</style>
<script src="/javascript/JQ/jquery.tools.min.js"></script>

<script type="text/javascript" language="javascript">
$(document).ready(function() { 
	$("#accordion").tabs("#accordion div.navbg", {tabs: 'h4',effect: 'slide'});
});
</script>
</head>
<body>

<div>
  <div class="userinfo">
  	<div>
    <p><%=Session("Admin_UserName")%></p>
    <p>祝您工作愉快！</p>
    </div>
  </div>

  <div id="accordion" class="navlist">
	<%
		If Is_Admin=True Then 
			sql = " SELECT DISTINCT MenuID,MenuName,Menu_Order FROM Admin_Menu  WHERE MenuVisibled='1' AND ParentID=0  ORDER BY Menu_Order ASC "
		Else
			sql = " SELECT DISTINCT MenuID,MenuName,Menu_Order FROM uvw_Menu_Priv  WHERE MenuVisibled='1' AND ParentID=0 And Admin_UserID = "&Session("Admin_UserId") & " ORDER BY Menu_Order ASC "
		End If
		
		'writebr sql
		Set rs = conn.execute(sql)
		Do While Not rs.Eof 
    %>
    <h4><a href="javascript:void(0);"><%=rs(1)%></a></h4>
    <div class="navbg">
      <div>
        <p class="t"></p>
        <ul>
		<%
        
			If Is_Admin=True Then 
			sql2 = " SELECT DISTINCT MenuID,MenuName,MenuPath,Menu_Order FROM Admin_Menu  WHERE MenuVisibled='1' AND ParentID= "&rs(0) & " ORDER BY Menu_Order ASC "
			Else
			
			sql2 = " SELECT DISTINCT MenuID,MenuName,MenuPath,Menu_Order FROM  uvw_Menu_Priv WHERE MenuVisibled='1' AND ParentID= "&rs(0) & " AND  Admin_UserID = "&Session("Admin_UserId") & " ORDER BY Menu_Order ASC "
			
			End If
			
			Set rs2 = conn.execute(sql2)
			
			
			If rs2.Eof Then
			Response.write "&nbsp;"
			Else
        
        %>
        
        <%
			Do While Not rs2.Eof 
        %>
          <li><a href="<%=rs2(2)%>" target="mainFrame"><%=rs2(1)%></a></li>
        <%
			rs2.movenext
			Loop
			End If
			rs2.close
		%>
        </ul>
        <p class="b"></p>
      </div>
    </div>
		<%
        rs.movenext
        Loop
        rs.close
        %>
  </div>
</div>

<%
Call Conn_Close()
%>
